-
Notifications
You must be signed in to change notification settings - Fork 3
fix: handle setting protected/type-enforced attributes correctly #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kinyoklion
requested changes
Aug 16, 2024
… private attributes Co-Authored-By: [email protected] <[email protected]>
kinyoklion
approved these changes
May 2, 2025
Merged
keelerm84
pushed a commit
that referenced
this pull request
May 2, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-cpp-client: 3.9.0</summary> ## [3.9.0](launchdarkly-cpp-client-v3.8.2...launchdarkly-cpp-client-v3.9.0) (2025-05-02) ### Features * generate events for flag prerequisites ([#465](#465)) ([30378a1](30378a1)) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.10.1 to 0.11.0 * launchdarkly-cpp-common bumped from 1.9.0 to 1.10.0 </details> <details><summary>launchdarkly-cpp-common: 1.10.0</summary> ## [1.10.0](launchdarkly-cpp-common-v1.9.0...launchdarkly-cpp-common-v1.10.0) (2025-05-02) ### Features * generate events for flag prerequisites ([#465](#465)) ([30378a1](30378a1)) ### Bug Fixes * handle setting protected/type-enforced attributes correctly ([#433](#433)) ([d73de43](d73de43)) </details> <details><summary>launchdarkly-cpp-internal: 0.11.0</summary> ## [0.11.0](launchdarkly-cpp-internal-v0.10.1...launchdarkly-cpp-internal-v0.11.0) (2025-05-02) ### Features * generate events for flag prerequisites ([#465](#465)) ([30378a1](30378a1)) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-common bumped from 1.9.0 to 1.10.0 </details> <details><summary>launchdarkly-cpp-server: 3.8.2</summary> ## [3.8.2](launchdarkly-cpp-server-v3.8.1...launchdarkly-cpp-server-v3.8.2) (2025-05-02) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.10.1 to 0.11.0 * launchdarkly-cpp-common bumped from 1.9.0 to 1.10.0 </details> <details><summary>launchdarkly-cpp-server-redis-source: 2.1.18</summary> ## [2.1.18](launchdarkly-cpp-server-redis-source-v2.1.17...launchdarkly-cpp-server-redis-source-v2.1.18) (2025-05-02) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-server bumped from 3.8.1 to 3.8.2 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses a bug where you couldn't set the
name
attribute as private using theAttributesBuilder::SetPrivate(key, value)
API.The issue was that this API forwards to an internal
AttributesBuilder::Set(key, value, is_private)
method, which disallowed setting of "protected" attributes.In this PR, I've re-designated attributes as:
_meta
,kind
, andkey
.anonymous
andname
Within (2), the current behavior is that both of these can be marked private, which isn't really correct. In reality only
name
can be redacted.So currently, you could say
SetPrivate("anonymous, true)
, and it'd set it and add it to the private attributes list. Come redaction time, it wouldn't be redacted.To make this totally consistent, we'd need to disallow
SetPrivate("anonymous", ..)
as well as modify theAddPrivateAttribute
andAddPrivateAttributes
APIs.Perhaps the behavior in this PR is sufficient, given some documentation that mentions that setting
anonymous
private isn't meaningful.